package com.santi;


import com.github.pagehelper.PageHelper;
import com.santi.entity.Book;
import com.santi.service.BookService;
import com.santi.service.impl.BookSericeImpl;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.awt.print.Pageable;
import java.util.List;


public class test {

    @Test
    public void test(){
        System.out.println("第一次更新");
        ApplicationContext context= new ClassPathXmlApplicationContext("applicationContext-database.xml","applicationContext-mvc.xml");
        BookService bookservice = context.getBean(BookSericeImpl.class);
        PageHelper.startPage(1,5);
        List<Book> list = bookservice.queryAll();
        System.out.println(list);

        for (Book book : list) {
            System.out.println(book);
        }

    }


}
